<?php
/**
 *  物流方式
*/

namespace app\api\service;


use app\api\model\LogisticsCompany;

class ShippingMethod
{
    /**
     *  物流列表
    */
    public function getMethodList($param){
        $result = LogisticsCompany::field('id,name')->select();
        if(!$result) {
            return [];
        } else {
            return $result->toArray();
        }
    }

    /**
     *  获取物流名称
    */
    public function getMethodItem($id)
    {
        $result = LogisticsCompany::where('id',$id)->field('id,name')->find();

        if(!$result) {
            return null;
        } else {
            return $result->toArray();
        }
    }


}